package
{
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.filesystem.File;
	import flash.filesystem.FileMode;
	import flash.filesystem.FileStream;
	
	public class MokeXLSTest extends Sprite
	{
		private var file:File = new File() ;
		
		public function MokeXLSTest()
		{
			stage.addEventListener(MouseEvent.CLICK,onClick);
		}

		private function onClick(event:MouseEvent):void
		{
			file.browseForOpen("open") ;
			file.addEventListener(Event.SELECT,onSelected);
		}
		
		private function onSelected(event:Event):void
		{
			var fileStream:FileStream=new FileStream();
			fileStream.open(event.target as File,FileMode.READ);
			var fileData:String=fileStream.readMultiByte(fileStream.bytesAvailable,"gb2312");
			trace(fileData); 
		}
	}
}